
console.log(1)
new Promise((resolve,reject)=>{
    console.log(2)
    // resolve()
    reject("出错了")
}).then(_=>{
    console.log(4)
}).catch(error=>{
    console.log(error)
})
console.log(3)

async function test (){
    try{
        let res = await new Promise((resolve,reject)=>{
            setTimeout(()=>{
                // resolve([7,8,9])
                reject('error')
            },0)
        })
    } catch(error){
        console.log(error)
    }
    console.log(6)
}
test()